import java.io.File;

public class h_1 {
    public static void main(String[] args) {
        /*删除一个多级文件夹. */
//        File f=new File("d:\\abc");
        deleteFile("d:\\abc");
    }
    public static void deleteFile(String file){
        File f=new File(file);
        File[] files = f.listFiles();
        for (File file1:files
        ) {
            if(file1.isFile()){
                file1.delete();
            }else {
                deleteFile(file1.toString());
            }
        }
    }
}
